package ziv.map.utils;

import com.baidu.location.LocationChangedListener;
import com.baidu.location.LocationClient;
import com.baidu.location.ReceiveListener;

import android.app.Application;
import android.util.Log;
import android.widget.TextView;

public class Location extends Application {

	public LocationClient mLocationClient = null;
	private String mData;
	//TextView mTv;

	@Override
	public void onCreate() {
		Log.v("ziv","Location-> onCreate");
		mLocationClient = new LocationClient(this);
	}

	public void logMsg(String str) {
		try {
			mData = str;
		//	mTv.setText(mData);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public class MyLocationChangedListener implements LocationChangedListener {
		@Override
		public void onLocationChanged() {
			logMsg("LocationChangedListener: ");
		}
	}

	public class MyReceiveListenner implements ReceiveListener {
		@Override
		public void onReceive(String strData) {
			logMsg("ReceiveListener: " + strData);
		}
	}

}